package com.easonji;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * @ClassName: ServletInitializer
 * @Description: Web程序启动类
 * @Author: LiuJun
 * @date: 2018/07/29 10:36
 * @Version: 1.0
 * @Copyright: Copyright (c) 2018 - 2019
 */
public class ServletInitializer extends SpringBootServletInitializer {

    private final static Logger logger = LoggerFactory.getLogger(ServletInitializer.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        logger.info("ServletInitializer is success!");
        return builder.sources(Application.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        logger.info("Application is success!");
    }
}
